package oop;

public class Main {
    public static void main(String[] args) {
        Shape s = new Circle(10);
        printArea(s);
        printGirth(s);
         s = new Rect(10,8);
        printArea(s);
        printGirth(s);
        s = new Square(10);
        printArea(s);
        printGirth(s);
    }

    private static void printArea(Shape s) {
        System.out.println("面积：" + s.area());
    }
    private static void printGirth(Shape s) {
        System.out.println("周长：" + s.girth());
    }
}
